package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TPatrolLandAssetsAttachMapper;
import com.ruoyi.system.domain.TPatrolLandAssetsAttach;
import com.ruoyi.system.service.ITPatrolLandAssetsAttachService;
import com.ruoyi.common.core.text.Convert;

/**
 * 土地资产巡查附件信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-08
 */
@Service
public class TPatrolLandAssetsAttachServiceImpl implements ITPatrolLandAssetsAttachService 
{
    @Autowired
    private TPatrolLandAssetsAttachMapper tPatrolLandAssetsAttachMapper;

    /**
     * 查询土地资产巡查附件信息
     * 
     * @param id 土地资产巡查附件信息主键
     * @return 土地资产巡查附件信息
     */
    @Override
    public TPatrolLandAssetsAttach selectTPatrolLandAssetsAttachById(Long id)
    {
        return tPatrolLandAssetsAttachMapper.selectTPatrolLandAssetsAttachById(id);
    }

    /**
     * 查询土地资产巡查附件信息列表
     * 
     * @param tPatrolLandAssetsAttach 土地资产巡查附件信息
     * @return 土地资产巡查附件信息
     */
    @Override
    public List<TPatrolLandAssetsAttach> selectTPatrolLandAssetsAttachList(TPatrolLandAssetsAttach tPatrolLandAssetsAttach)
    {
        return tPatrolLandAssetsAttachMapper.selectTPatrolLandAssetsAttachList(tPatrolLandAssetsAttach);
    }

    /**
     * 新增土地资产巡查附件信息
     * 
     * @param tPatrolLandAssetsAttach 土地资产巡查附件信息
     * @return 结果
     */
    @Override
    public int insertTPatrolLandAssetsAttach(TPatrolLandAssetsAttach tPatrolLandAssetsAttach)
    {
        tPatrolLandAssetsAttach.setCreateTime(DateUtils.getNowDate());
        return tPatrolLandAssetsAttachMapper.insertTPatrolLandAssetsAttach(tPatrolLandAssetsAttach);
    }

    /**
     * 修改土地资产巡查附件信息
     * 
     * @param tPatrolLandAssetsAttach 土地资产巡查附件信息
     * @return 结果
     */
    @Override
    public int updateTPatrolLandAssetsAttach(TPatrolLandAssetsAttach tPatrolLandAssetsAttach)
    {
        tPatrolLandAssetsAttach.setUpdateTime(DateUtils.getNowDate());
        return tPatrolLandAssetsAttachMapper.updateTPatrolLandAssetsAttach(tPatrolLandAssetsAttach);
    }

    /**
     * 批量删除土地资产巡查附件信息
     * 
     * @param ids 需要删除的土地资产巡查附件信息主键
     * @return 结果
     */
    @Override
    public int deleteTPatrolLandAssetsAttachByIds(String ids)
    {
        return tPatrolLandAssetsAttachMapper.deleteTPatrolLandAssetsAttachByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除土地资产巡查附件信息信息
     * 
     * @param id 土地资产巡查附件信息主键
     * @return 结果
     */
    @Override
    public int deleteTPatrolLandAssetsAttachById(Long id)
    {
        return tPatrolLandAssetsAttachMapper.deleteTPatrolLandAssetsAttachById(id);
    }
}
